<?php
/*
 * 进云智能生成平台
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
 */

defined('BY_JYA') or exit('error');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return=array();
$return['setting']=$this->plugin_setting('basic');
if($_RQ['op']=='main'){
	 //查询公告
	$notices=pdo_getall('jy_smallquan_notice',array('uniacid'=>$_SESSION['uniacid'],'status'=>1),'','createtime desc');
	if($notices){
		foreach($notices as &$item){
			$item['createtime']=date('Y-m-d h:i',$item['createtime']);
		}	
	}	
	$return['notices']=$notices;
	$return['params']=array('keyword'=>'');
	set_html('title','公告列表');
	exi($return);
}
if($_RQ['op']=='detail'){
	$id=intval($_RQ['id']);
	$item=pdo_get('jy_smallquan_notice',array('uniacid'=>$_SESSION['uniacid'],'id'=>$id));
	$item['createtime']=date('Y-m-d h:i',$item['createtime']);	
	$return['item']=$item;
	set_html('title','公告详情');
	exi($return);
}